From b2e19866ea2ccaca9593f4f4b954ab9d70791dab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 9 Apr 2015 00:14:20 -0400 Subject: [PATCH] wayland: Wait for output and seat information When we open the connection, we get the wl_output object, but we return before all the information such as monitor geometry has arrived, which causes us to misinform early users of this information. Do a roundtrip here that causes us to wait until the information is complete. Do the same for seats, just in case. https://bugzilla.gnome.org/show_bug.cgi?id=747471 --- gdk/wayland/gdkdisplay-wayland.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 6d9a50e8ab..6df25cff06 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -193,11 +193,13 @@ gdk_registry_handle_global (void *data, output = wl_registry_bind (display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2)); _gdk_wayland_screen_add_output (display_wayland->screen, id, output, MIN (version, 2)); + wl_display_roundtrip (display_wayland->wl_display); } else if (strcmp (interface, "wl_seat") == 0) { seat = wl_registry_bind (display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4)); _gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat); + wl_display_roundtrip (display_wayland->wl_display); } else if (strcmp (interface, "wl_data_device_manager") == 0) { -- 2.30.2